<?php
/* Start session */
session_start();

/* include the classes */
include 'include_classes.php';

/* Create new user */
$user = new User();

/* Get the username + password */
$userName = $_POST["username"];
$pass = $_POST["password"];

/* Check login */
if($user -> checkLogin($userName, $pass)){
	$_SESSION["user"] = serialize($user);
	header('location: ../index.php');
} else {
	header('location: ../index.php');
}
?>